<template>
  <div>
    <h1>小头儿子</h1>
    <h2>{{ money }}</h2>
    <h1>{{ list }}</h1>
    <ul>
      <li v-for="(item, index) in list" :key="index">
        {{ item.name }}----{{ item.age }}
      </li>
    </ul>
  </div>
</template>

<script>
/* 
props传值（父传子）
将父级组件中的值通过v-bind绑定到子级组件上面
子级组件通过props去接收

*/
export default {
  name: "",
  //   props: ["money", "list"],
  /*  props: {
    money: {
      type: String,
    },
    list: {
      type: Array,
    },
  }, */
  props: {
    money: {
      type: String,
      required: true,
    },
    list: {
      type: Array,
      required: true,
    },
  },
  data() {
    return {};
  },
};
</script>
<style lang='' scoped>
</style>